package com.sanshi.project.admin.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 编码记录
 *
 * @author nikon
 * @date 2023-11-12 17:29:58
 */
@Data
@TableName("code_record")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "编码记录")
public class CodeRecordEntity extends Model<CodeRecordEntity> {


    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private Long id;

    /**
     * 业务类型;用于何种业务编号
     */
    @Schema(description = "业务类型;用于何种业务编号")
    private String type;

    /**
     * 编码名称
     */
    @Schema(description = "编码名称")
    private String name;

    /**
     * 编码值
     */
    @Schema(description = "编码值")
    private String value;

    /**
     * 流水号
     */
    @Schema(description = "流水号")
    private int sortNo;

    /**
     * 图片地址
     */
    @Schema(description = "图片地址")
    private String qrCodeImg;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 删除标记;删除标记，0未删除，1已删
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "删除标记;删除标记，0未删除，1已删")
    private String delFlag;

    /**
     * 租户号
     */
    @Schema(description = "租户号")
    private Long tenantId;
}